Fully Qualified Name: | Zend\Code\Annotation\AnnotationManager |
Implements: | EventManagerAwareInterface |
Pluggable annotation manager
Simply composes an EventManager. When createAnnotation() is called, it fires off an event of the same name, passing it the resolved annotation class, the annotation content, and the raw annotation string; the first listener to return an object will halt execution of the event, and that object will be returned as the annotation.
Name | Description | Defined By |
---|---|---|
attach() | Attach a parser to listen to the createAnnotation event | AnnotationManager |
createAnnotation() | Create Annotation | AnnotationManager |
getEventManager() | Retrieve event manager | AnnotationManager |
setEventManager() | Set the event manager instance | AnnotationManager |
Attach a parser to listen to the createAnnotation event
Parameter Name | Type | Description |
---|---|---|
$parser | \ParserInterface |
Returns: \AnnotationManager
Create Annotation
Parameter Name | Type | Description |
---|---|---|
$annotationData | string[] |
Returns: bool|\stdClass
Retrieve event manager
Lazy loads an instance if none registered.
Returns: \EventManagerInterface
Set the event manager instance
Parameter Name | Type | Description |
---|---|---|
$events | \EventManagerInterface |
Returns: \AnnotationManager